repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ACM ICPC::Regional Warmup 1 (Easy version) + Algunos cambios en el manual
[andmenj-acm.git]
/
900 - Brick Wall Patterns
/
900.cpp
blob
c67a7afdf7f79b9a8d7ba55c39925f5fe0ccbbf8
1
#include <iostream>
2
3
using namespace
std
;
4
5
unsigned long long
f
[
51
];
6
7
int
main
(){
8
f
[
0
] =
0
;
9
f
[
1
] =
1
;
10
f
[
2
] =
2
;
11
for
(
int
i
=
3
;
i
<=
50
; ++
i
){
12
f
[
i
] =
f
[
i
-
1
] +
f
[
i
-
2
];
13
}
14
int
n
;
15
while
(
cin
>>
n
&&
n
){
16
cout
<<
f
[
n
] <<
endl
;
17
}
18
}